package com.yueshop.order;

import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 * 1.引入amqp 场景启动器 spring-boot-starter-amqp
 * 2.根据自动配置 在容器中添加 CachingConnectionFactory RabbitTemplate  AmqpAdmin RabbitMessagingTemplate
 * 3.配置rabbitMQ  前缀 spring.rabbitmq
 * @ConfigurationProperties(prefix = "spring.rabbitmq")
 * public class RabbitProperties {
 * 4.添加注解 @EnableRabbit
 * 5.Rabbitlinster 注解来监听  必须添加@EnableRabbit

 */
@EnableFeignClients
@EnableRedisHttpSession
@EnableDiscoveryClient
@EnableRabbit
@SpringBootApplication
public class YueshopOrderApplication {

    public static void main(String[] args) {
        SpringApplication.run(YueshopOrderApplication.class, args);
    }

}
